/*
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License version 2 as published by the Free Software Foundation.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef CUSTOMPROGRESSWIDGET_H
#define CUSTOMPROGRESSWIDGET_H
#include <QWidget>
#include <QPoint>
class QMouseEvent;
class QPaintEvent;

class CustomProgressWidget : public QWidget
{
    Q_OBJECT
    public:
        CustomProgressWidget(int UID, QObject* receiver, QWidget* parent);
        virtual ~CustomProgressWidget();
        int value(){return m_Value;}
        void setValue(int value);
    private:
        virtual void mousePressEvent ( QMouseEvent * event );
        virtual void paintEvent ( QPaintEvent * event );
        virtual void resizeEvent ( QResizeEvent * event );
        void calculateValue();
    
    signals:
        void setTaskProgress(int, int);
    private:
        QPoint  m_Point;
        int     m_Value;
        int     m_UID;
};

#endif // CUSTOMPROGRESSWIDGET_H
